<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<include file="Admin/head">

		<body>
			<include file="Admin/top">
				<div class="container-fluid">
					<div class="row">
						<include file="Admin:leftmenu" />
						<div class="col-md-10">

							<ol class="breadcrumb">
								<li>
									<a href="<{:U('Article/showlist')}>">新闻管理</a>
								</li>
								<li class="active">新闻分类</li>
							</ol>

							<div class="row">
								<div class="col-sm-12">
									<a class="btn btn-info btn-sm" href="/index.php?g=admin&m=category&a=add">添加分类</a>
								</div>
							</div>

							<p></p>

							<TABLE class="table table-striped table-bordered table-hover">
								<THEAD>
									<tr>
										<th>ID</th>
										<TH>名称</TH>
										<TH>排序</TH>
										<TH>操作</TH>
									</tr>
								</THEAD>
								<TBODY>
									<!--<tr>
								<td>1</td>
								<td><strong> 职业指导</strong> - (管理员：无)</td>
								<td></td>
								<td>
									<a href="/index.php?g=admin&m=category&a=edit&id=1" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> 编辑</a>
									<a href="javascript:void(0);" attr="delaccount_1" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-trash"></i> 删除</a>
									<a href="/index.php?g=admin&m=category&a=add&fid=1&path=0-1-" class="btn btn-info btn-sm"><i class='glyphicon glyphicon-plus icon-white'></i> 添加子栏目</a>
								</td>
							</tr>
							<tr>
								<td>2</td>
								<td><strong> 面试宝典</strong> - (管理员：无)</td>
								<td></td>
								<td>
									<a href="/index.php?g=admin&m=category&a=edit&id=2" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> 编辑</a>
									<a href="javascript:void(0);" attr="delaccount_2" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-trash"></i> 删除</a>
									<a href="/index.php?g=admin&m=category&a=add&fid=2&path=0-2-" class="btn btn-info btn-sm"><i class='glyphicon glyphicon-plus icon-white'></i> 添加子栏目</a>
								</td>
							</tr>
							<tr>
								<td>3</td>
								<td><strong> 劳动法苑</strong> - (管理员：无)</td>
								<td></td>
								<td>
									<a href="/index.php?g=admin&m=category&a=edit&id=3" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-edit"></i> 编辑</a>
									<a href="javascript:void(0);" attr="delaccount_3" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-trash"></i> 删除</a>
									<a href="/index.php?g=admin&m=category&a=add&fid=3&path=0-3-" class="btn btn-info btn-sm"><i class='glyphicon glyphicon-plus icon-white'></i> 添加子栏目</a>
								</td>
							</tr>-->
								</TBODY>
							</TABLE>

							<script type="text/javascript">
								$(document).ready(function() {
									$("a[attr^='delaccount_']").each(function() {
										var tmp = $(this).attr('attr').split('_');
										$(this).bind("click", function() {
											var dialog = art.dialog({
												content: '删除后不可恢复，确认吗？',
												ok: function() {
													this.content('正在删除');
													$.ajax({
														url: "/index.php?g=admin&m=category&a=del&id=" + tmp[1] + "&temp=" + new Date().getTime(),
														success: function(data) {
															if(data == 1) {
																window.location.href = "/index.php?g=admin&m=category&a=index";
															} else if(data == 2) {
																dialog.content('请先删除子栏目').time(2);
															} else {
																dialog.content('删除失败').time(2);
															}
														},
													});
													return false;
												},
												lock: true,
											});
										});
									});
								});
							</script>

							<input type="hidden" id="menu_action" value="article" />

						</div>
					</div>

				</div>

				<script type="text/javascript">
					$(document).ready(function() {
						//幻灯片元素与类“menu_body”段与类“menu_head”时点击
						var menu_action = $("#menu_action").val();
						$("#p_" + menu_action).addClass("select");
						$("#b_" + menu_action).show().addClass("local");

						$("#nav p").click(function() {
							$(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
							$("#nav p").removeClass("select");
							$(this).addClass("select");
							$(this).next("div.menu_body").addClass("local");
						});
					});
				</script>

		</body>

</html>